package com.carkepper.appraisal.service.impl;

import com.carkepper.appraisal.dao.AppraisalMapper;
import com.carkepper.appraisal.pojo.Appraisal;
import com.carkepper.appraisal.service.AppraisalService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 服务评价表的service层的实现类
 */
@Service
public class AppraisalServiceImpl implements AppraisalService {

    @Autowired
    private AppraisalMapper appraisalMapper;
    @Autowired
    private AppraisalMongoServiceImpl appraisalMongoServiceImpl;

    /**
     * 查询所有信息
     *
     * @return
     */
    @Override
    public List<Appraisal> findAll() {
        List<Appraisal> appraisals = appraisalMapper.selectAll();
        return appraisals;
    }


    /**
     * 增加一条信息
     *
     * @param appraisal
     */
    @Override
    public void add(Appraisal appraisal) {
        appraisalMapper.insertSelective(appraisal);
    }

}
